/**
 * Created by RayLew on 2014/11/29.
 */

/*从此步重新开始*/
function reStartFromHere(where) {
    var ret = reStartFromWhere(where);
    if (ret == true) {
        //to do
        $("#reStartNotice").text('设置成功').fadeOut(5000);
    } else {
        //to do
        $("#reStartNotice").text('设置失败').fadeOut(5000);
    }
    location.reload();
}


function setCheckAllStatus(typeName) {
    $("input[name='" + typeName + "']").each(function () {
        var the = $(this);
        var value = the.val();
        var name = the.attr("name")

        var checkedAll = true;

        $("input[typeName='" + name + "']").each(function () {
            var checkedCol = $(this);
            if (checkedCol.attr("value") == value) {
                if (!checkedCol.is(":checked")) {
                    checkedAll = false;
                }
            }
        })

        the.prop("checked", null);
        if (checkedAll) {
            the.prop("checked", "checked");
        }
    });
}